From: Khachatryan Karen Date: Tue, 27 May 2025 18:53:04 +0000 (+0300) Subject: luci-app-antiblock: Disable routes without deleting X-Git-Url: http://git.openwrt.org/%22https:/collectd.org/%22http:/www.crowdsec.net//%22https%22/%22https:/collectd.org/%22http:/www.crowdsec.net/%22https%22?a=commitdiff_plain;h=0a09ae1805f3e1184ad67ebb9a47b00c020c8b27;p=project%2Fluci.git luci-app-antiblock: Disable routes without deleting 1) Added the ability to disable routes without deleting them. Signed-off-by: Khachatryan Karen --- diff --git a/applications/luci-app-antiblock/htdocs/luci-static/resources/view/antiblock/routes.js b/applications/luci-app-antiblock/htdocs/luci-static/resources/view/antiblock/routes.js index 65ceea5c3c..215885670b 100644 --- a/applications/luci-app-antiblock/htdocs/luci-static/resources/view/antiblock/routes.js +++ b/applications/luci-app-antiblock/htdocs/luci-static/resources/view/antiblock/routes.js @@ -21,6 +21,10 @@ return view.extend({ o = s.option(form.Value, 'domains_path', _('Domains path'), _('Domains path/URL. If you want to add domains via LuCI, specify the files in the /etc/antiblock folder.')); o.default = '/etc/antiblock/'; + o = s.option(form.Flag, 'enabled', _('Enable')); + o.default = o.enabled; + o.editable = true; + return m.render(); } }); diff --git a/applications/luci-app-antiblock/po/templates/antiblock.pot b/applications/luci-app-antiblock/po/templates/antiblock.pot index f448a70fb0..d878cd340e 100644 --- a/applications/luci-app-antiblock/po/templates/antiblock.pot +++ b/applications/luci-app-antiblock/po/templates/antiblock.pot @@ -38,6 +38,10 @@ msgstr "" msgid "Domains path:" msgstr "" +#: applications/luci-app-antiblock/htdocs/luci-static/resources/view/antiblock/routes.js:24 +msgid "Enable" +msgstr "" + #: applications/luci-app-antiblock/htdocs/luci-static/resources/view/antiblock/args.js:13 msgid "Enabled" msgstr ""